<template>
	<view>
		<top-navigation bgColor="#ffffff">
			<template #left-slot>
				介绍详情
			</template>
		</top-navigation>
		<view class="content">
			<u-parse :content="content"></u-parse>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				content: '',
				id:''
			}
		},
		onLoad(e) {
			this.id = e.id
			if (e.id) {
				this.getbannerdetail()
			} else {
				this.getContent();
			}
		},
		methods: {
			getContent() {
				this.$request('/applet/index/page/getConfig', {
					type: '7'
				}).then(res => {
					if (res.code == 200) {
						this.content = res.data.content
					}
				})
			},
			getbannerdetail() {
				let params = {
					ad_id: this.id
				}
				this.$request('/applet/index/page/getAdDetail', params).then(res => {
					if (res.success) {
						this.content = res.data[0].content
					} else this.$toast(res.msg)
				})
			}
		},
	}
</script>

<style scoped lang="scss">
	.content {
		padding: 30rpx;
	}
</style>
